package com.ggk911.pharmacy_system.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.oas.annotations.EnableOpenApi;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;

/**
 * 用于定义文档相关信息
 *
 * @author ggk-911
 * @version 1.0 2023/2/21 9:12
 */
@Configuration
@EnableOpenApi//开启swagger
public class SwaggerConfig {
    @Bean //返回值交给spring管理
    public Docket createDocket() {
        return new Docket(DocumentationType.OAS_30)
                .apiInfo(new ApiInfoBuilder()
                        .title("pharmacy_system项目接口文档")
                        .version("1.0")
                        .description("文档...")
                        .build());
    }
}
